﻿// ActionScript file
/**
 * 皮肤类的基类,定义基本的交互函数
 */
package org.nickro.skins{
	import flash.display.MovieClip;
	import flash.events.Event;
	import flash.events.MouseEvent;
	
	public class BaseSkin extends MovieClip{
		public function BaseSkin(){
			this.buttonMode=true;
			this.mouseChildren=false;
			this.addEventListener(Event.ADDED_TO_STAGE,onAdded);
		}
		private function onAdded(e:Event):void{
			addState();
			this.addEventListener(MouseEvent.MOUSE_OVER,onOver);
			this.addEventListener(MouseEvent.MOUSE_OUT,onOut);
			//this.addEventListener(MouseEvent.MOUSE_DOWN,onDown);
			
		}
		protected function addState():void{
			
		}
		private function onOver(e:MouseEvent):void{
			overState();
		}
		
		private function onOut(e:MouseEvent):void{
			outState();
		}
		protected function overState():void{
		}
		protected function outState():void{
		}
	}
}